package ACM.dog;

/**
 * @Author wwk
 * @DATE 2022/8/27 19:28
 */
import java.util.*;

public class second {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++){
            nums[i] = scanner.nextInt();
        }

        HashMap<Integer, Integer> oddMap = new HashMap<>();
        for (int i = 1; i < n; i+=2) {
            oddMap.put(nums[i], oddMap.getOrDefault(nums[i],0)+1 );
        }
        //奇数最多数和次数
        int oddMax=0, oddSize = -1;
        for (Map.Entry<Integer, Integer> entry : oddMap.entrySet()) {
            if(entry.getValue() > oddSize){
                oddSize = entry.getValue();
                oddMax = entry.getKey();
            }
        }

        HashMap<Integer, Integer> evenMap = new HashMap<>();
        for (int i = 0; i < n; i+=2) {
            evenMap.put(nums[i], evenMap.getOrDefault(nums[i],0)+1 );
        }
        //偶数最多数和次数
        int evenMax=0, evenSize = -1;
        for (Map.Entry<Integer, Integer> entry : evenMap.entrySet()) {
            if(entry.getValue() > evenSize){
                evenSize = entry.getValue();
                evenMax = entry.getKey();
            }
        }

        //不相等时这样直接可以
        if(evenMax != oddMax){
            System.out.println(n-evenSize-oddSize);
        }else{
            //相等时，就要看哪个位置上的多
            int num, size = -1;
            if(evenSize>oddSize ){
                for (Map.Entry<Integer, Integer> entry : oddMap.entrySet()) {
                    if(entry.getKey()!=oddMax && entry.getValue() > size){
                        size = entry.getValue();
                        num = entry.getKey();
                    }
                }
                System.out.println(n-evenSize-size);
            }else{
                for (Map.Entry<Integer, Integer> entry : evenMap.entrySet()) {
                    if(entry.getKey()!=oddMax && entry.getValue() > size){
                        size = entry.getValue();
                        num = entry.getKey();
                    }
                }
                System.out.println(n-oddSize-size);
            }
        }
    }
}
